package com.example.mq.common;

import com.example.mq.mqsever.core.BasicProperties;

import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: WHY
 * Date: 2023-09-06
 * Time: 13:16
 */
@FunctionalInterface
public interface Consumer {
    //这个方法是投递的意思,每次服务器收到消息都调用他
    //通过这个方法把消息推送给消费者
    //是一个回调函数(函数式接口),收到消息之后要处理消息时调用的方法
    void handlerDelivery(String consumerTag, BasicProperties basicProperties,byte[] body) throws MqException, IOException, ClassNotFoundException;
}
